|
|
 |
|
|
|
|
ByVal Escapement As Long, _
ByVal Orientation As Long, _
ByVal Weight As Long, _
ByVal Italic As Long, _
ByVal Underline As Long, _
ByVal StrikeOut As Long, _
ByVal CharacterSet As Long, _
ByVal OutputPrecision As Long, _
ByVal ClipPrecision As Long, _
ByVal Quality As Long, _
ByVal PitchAndFamily As Long, _
ByVal Face As String) As Long |
|
|
|
|
|
|
|
|
The function's parameters are described shortly. |
|
|
|
|
|
|
|
|
CreateFont returns the handle of a logical font that describes the font you specified using the parameters. The operating system's font mapper selects a physical font that matches your logical font as closely as possible. How close the match is depends on the parameters you specify in CreateFont and on the fonts available on your system. |
|
|
|
|
|
|
|
|
After you have obtained a logical font handle, you can use the SelectObject API function to make a form or picture box use the font. |
|
|
|
|
|
|
|
|
Usually, a program specifies at least the Height and Face parameters to define the size and name of the font. You can set the values of many of the other parameters to zero to make the font mapper use default values. All the CreateFont parameters are described in the following sections. |
|
|
|
|
|
|
|
|
The Height parameter gives the height for the font in logical units. If this parameter is greater than zero, it specifies the cell height of the font. Keep in mind that the cell height includes internal leading space that is usually empty. If Height is less than zero, it specifies the character height of the font. The character height does not include the internal leading space. If the Height parameter is zero, the font mapper uses a default value. |
|
|
|
|
|
|
|
|
The Width parameter specifies the average width of characters in the font. Set Width to zero to make the font mapper pick a default width that matches the Height parameter. |
|
|
|
|
|
|
|
|
The font's escapement is the angle of slope of the text in tenths of degrees measured counterclockwise from horizontal. Figure 4.6 shows how to measure the escapement of rotated text. |
|
|
|
|
|